#!/bin/bash


source mysql_vars.sh

sudo docker build -t kissnapp_mysql .

sudo docker run --name kissnapp_mysql_server \
-v /home/deploy/mysql/data:/var/lib/mysql \
-p 3308:3306 \
-e MYSQL_ROOT_PASSWORD=${ROOT_PASSWORD} -d kissnapp_mysql

sudo docker exec -it kissnapp_mysql_server bash -l

# run in container
# cd /home && ./mysql_init.sh

# connect to container mysql server
# mysql -u ejabberd --password=${MYSQL_PASSWORD} -h127.0.0.1 -P3308 -D ejabberd